package eclant.ant.types;

import java.io.File;

import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.IClasspathContainer;

import eclant.ant.types.FileSetClasspathVisitor.EntryKind;
import eclant.ant.types.FileSetClasspathVisitor.EntrySelector;

final class DefaultEntrySelector implements EntrySelector
{
	static final DefaultEntrySelector INSTANCE = new DefaultEntrySelector();

	@Override
	public boolean isSelected(EntryKind kind, File library, EntryKind srcKind,
			IClasspathContainer container)
	{
		return container == null || container.getKind() == IClasspathContainer.K_APPLICATION;
	}

	@Override
	public boolean isSelected(EntryKind kind, IResource resource, EntryKind srcKind,
			IClasspathContainer container)
	{
		return container == null || container.getKind() == IClasspathContainer.K_APPLICATION;
	}

}
